$(document).ready(function () {

    scoreFun($("#startone"));
    scoreFun($("#starttwo"),{
        fen_d:22,//每一个a的宽度
        ScoreGrade:5//a的个数5
    });
    //显示分数
    $(".show_number li p").each(function(index, element) {
        var num=$(this).attr("tip");
        var www=num*2*16;//
        $(this).css("width",www);
        $(this).parent(".atar_Show").siblings("span").text(num+"分");
    });


$(document).on('click','.bottom',submitPingjia);
    function submitPingjia() {
        var content=$('.pingjia-content').val();
        var orderProductId= $('.dis-list-box').data('orderid');
        var starDegree=$('.fenshu').html();

        $.ajax({
            url:C.interface.userPingjia,
            type:'post',
            dataType:'json',
            data:{
                content:content,
                orderProductId:orderProductId,
                starDegree:starDegree,
                token:C.token
            },
            success:function (response) {
                if (response.result=='success'){
                    alert('评价信息提交啦。');
                }else if (response.result ==='login'){
                    alert('登录过期请重新登录');
                    againLogin();
                }else {
                    alert(response.errorMsg);
                }
            }
        })

    }

});